package util;
import static java.lang.Math.PI;
public class MyMath {
	public static double aTan(double o, double a)
	{
		if(o == 0)
			return 0;
		if(a == 0)
			return Double.MAX_VALUE;
		double refAngle = Math.atan(Math.abs(o) / Math.abs(a));
		if(o > 0)
		{
			if(a > 0)
				return refAngle;
			if(a < 0)
				return PI - refAngle;
		}
		if(o < 0)
		{
			if(a > 0)
				return -refAngle;
			if(a < 0)
				return PI + refAngle;
		}
		return 0;
	}
}
